package ads_fld

import (
	"server/middleware"

	"github.com/gin-gonic/gin"
)

type AdsFldRouter struct {
}

func (s *AdsFldRouter) InitAdsFldRouter(Router *gin.RouterGroup) {
	adsFldRouter := Router.Group("adsFld").Use(middleware.OperationRecord())
	adsFldRouterWithoutRecord := Router.Group("adsFld")
	var adsFldApi = AdsFldApi{}
	{
		adsFldRouter.POST("createAdsFld", adsFldApi.CreateAdsFld)
		adsFldRouter.DELETE("deleteAdsFld", adsFldApi.DeleteAdsFld)
		adsFldRouter.DELETE("deleteAdsFldByIds", adsFldApi.DeleteAdsFldByIds)
		adsFldRouter.PUT("updateAdsFld", adsFldApi.UpdateAdsFld)
	}
	{
		adsFldRouterWithoutRecord.GET("findAdsFld", adsFldApi.FindAdsFld)
		adsFldRouterWithoutRecord.GET("getAllAdsFlds", adsFldApi.GetAllAdsFlds)
		adsFldRouterWithoutRecord.GET("getAdsFldList", adsFldApi.GetAdsFldList)
		adsFldRouterWithoutRecord.POST("getAdsFld", adsFldApi.GetAdsFld)
	}
}
